<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	 <script type="text/javascript">
   		var formUrl = "update.act?ajax=1";
   		var validateConfig = {
	           rules: {
	               password: {
	                   minlength: 6
	               },
	               phoneNumber: {
	                   minlength: 7
	               },
	               confirm_password: {
	                   minlength: 6,
	                   equalTo: "[name='password']"
	               }
	           },
	           messages: {
	               password: {
	                   required: "请输入您的密码",
	                   minlength: "密码必须6个字符以上"
	               },
	               phoneNumber: {
	                   minlength: "联系号码不能少于7个字符"
	               },
	               confirm_password: {
	                   required: "请再次输入密码",
	                   minlength: "密码必须6个字符以上",
	                   equalTo: "两次输入的密码不一致"
	               },
	               email: "请输入正确的E-mail地址"
	           }
	       };
   	</script>
	<%@include file="/WEB-INF/jsp/hadmin/addHeader.jsp"%>
</head>
<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
			<div class="col-sm-10">
              <form method="post" onsubmit="return onSubmit(this);" class="form-horizontal m-t" id="${actionID }Form">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">ID：</label>
                                <div class="col-sm-8">
                                    <input required name="nickName" class="form-control" type="text">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 用户ID,不能更改</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名：</label>
                                <div class="col-sm-8">
                                    <input maxlength="10" name="name" class="form-control" type="text" class="valid">
                                </div>
                            </div>
                          
                            <div class="form-group">
                                <label class="col-sm-3 control-label">密码：</label>
                                <div class="col-sm-8">
                                    <input placeholder="不改留空" name="password" class="form-control" type="password">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">确认密码：</label>
                                <div class="col-sm-8">
                                    <input name="confirm_password" class="form-control" type="password">
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-3 control-label">性别：</label>
                                <div class="col-sm-8">
                                     <label class="checkbox-inline">
                                        <input name="sex" type="radio" value="男" >&nbsp;男</label>
                                    <label class="checkbox-inline">
                                        <input name="sex" type="radio" value="女" >&nbsp;女</label>
                                    <label class="checkbox-inline">
                                        <input name="sex" type="radio" value="保密" >&nbsp;保密</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">E-mail：</label>
                                <div class="col-sm-8">
                                    <input name="email" class="form-control" type="email">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系号码：</label>
                                <div class="col-sm-8">
                                    <input maxlength="11" name="phoneNumber" class="form-control" type="number">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户组：</label>
                                <div class="col-sm-8">
                                	<c:forEach items="${roleNameList }" var="temp" varStatus="status">
										 <label class="checkbox-inline">
										 	<input <c:if test="${domain.roleSet.contains(temp) }"> checked="checked"</c:if>  type="checkbox" name="roleSet" value="${temp }"/>&nbsp;${temp }
										</label>
									</c:forEach>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                </form>
            </div>
    </div>
	<%@include file="/WEB-INF/jsp/hadmin/include/validateForm.jsp" %>
	<st:FillInputByDomain fieldsSkip="password,roleSet" />
</body>

</html>
